<?php
require_once (__DIR__ . "/../../models/Orders.php");
require_once (__DIR__ . "/../../models/Users.php");
require_once (__DIR__ . "/../../models/PaymentMethods.php");
require_once (__DIR__ . "/../../models/Keywords.php");
require_once (__DIR__ . "/../../models/Addresses.php");

$row = Orders::Get($_REQUEST['id']);
$user = Users::Get($row['userId']);
$pmt = PaymentMethods::Get($row['paymentId']);
$ptype = Keywords::GetName($row['paymentType']);
$saddr = Addresses::Get($row['shipAddress']);
?>
				<dl class="dl-horizontal">
					<dt>User Id:</dt>
					<dd><?php echo $user['firstName'].' '.$user['lastName'];?></dd>
					<dt>Total:</dt>
					<dd><?php echo $row['total'];?></dd>
					<dt>Payment Id:</dt>
					<dd><?php echo Keywords::GetName($pmt['accountType']);?></dd>
					<dt>Payment Type:</dt>
					<dd><?php echo $ptype;?></dd>
					<dt>Ship Address:</dt>
					<dd><?php echo $saddr['line_1'].'...';?></dd>
					<dt>Date Shipped:</dt>
					<dd><?php echo $row['dateShipped'];?></dd>
					<dt>Created:</dt>
					<dd><?php echo $row['created_at'];?></dd>
					<dt>Updated:</dt>
					<dd><?php echo $row['updated_at'];?></dd>
				</dl>